﻿<sap:ActivityDesigner x:Class="MyActivities.Design.ActivityWithArgumentDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
xmlns:s="clr-namespace:System;assembly=mscorlib">
    <sap:ActivityDesigner.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MyActivities.Design;component/Themes/Activities.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter"/>
        </ResourceDictionary>
    </sap:ActivityDesigner.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Label Grid.Column="0" Content="Text" />
        <sapv:ExpressionTextBox Grid.Column="1"
            OwnerActivity="{Binding Path=ModelItem}"
            Expression="{Binding Path=ModelItem.MyArgument, Mode=TwoWay,
            Converter={StaticResource ResourceKey=ArgumentToExpressionConverter},
            ConverterParameter=In}" ExpressionType="{x:Type s:String}" />
    </Grid>
</sap:ActivityDesigner>
